﻿using Camc.Quality.QualityAnalysis.RFormBase;
using Camc.Quality.QualityAnalysis.RFormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.QualityAnalysis.RFormEntity
{
    public class R横向质心测量记录表 : RTableBase
    {
        public R横向质心测量记录表(int serialNum, Guid rWorkStepEntityId, Guid rProcessesEntityId, int sort,string recordRemark)
        {
            SerialNum = serialNum;
            RWorkStepEntityId = rWorkStepEntityId;
            RProcessesEntityId = rProcessesEntityId;
            Sort = sort;
            RecordRemark = recordRemark;
        }
        public override string FormName { get; protected set; } = "横向质心测量记录表";
        /// <summary>
        /// 记录要求
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="recordLocation"></param>
        /// <returns></returns>
        public RRecordRequirementsEntity SetRecordRequirements(RRecordRequirementsEntity entity, string recordLocation)
        {
            entity.SetRecordLocation(recordLocation, "位置");

            return entity;
        }
        /// <summary>
        /// 实测值
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="firstMeasuredValues"></param>
        /// <param name="secondMeasuredValues"></param>
        /// <param name="thirdMeasuredValues"></param>
        /// <param name="fourthMeasuredValues"></param>
        /// <returns></returns>
        public RMeasuredResultEntity SetMeasuredResult(RMeasuredResultEntity entity, string firstMeasuredValues, string secondMeasuredValues, string thirdMeasuredValues, string fourthMeasuredValues)
        {
            entity.SetFirstMeasuredValues(firstMeasuredValues, "后支点称重");
            entity.SetSecondMeasuredValues(secondMeasuredValues, "后支点有效");
            entity.SetThirdMeasuredValues(thirdMeasuredValues, "前支点称重");
            entity.SetFourthMeasuredValues(fourthMeasuredValues, "前支点有效");
            return entity;
        }
    }
}
